/* 组件样式文件 */

/* 登录页面样式 */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.login-box {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    padding: 40px;
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-logo {
    font-size: 48px;
    margin-bottom: 10px;
}

.login-title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-bottom: 30px;
}

.login-form .form-group {
    margin-bottom: 20px;
    text-align: left;
}

.login-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
}

.login-form input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.login-form input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.login-btn {
    width: 100%;
    padding: 12px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.login-btn:hover {
    background: #0056b3;
}

.login-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.login-error {
    background: #f8d7da;
    color: #721c24;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
}

/* 看板样式 */
.kanban-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.kanban-title h2 {
    margin: 0 0 10px 0;
    color: #333;
}

.kanban-stats {
    display: flex;
    gap: 20px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.stat-label {
    color: #666;
    font-size: 14px;
}

.stat-value {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 16px;
}

.kanban-actions {
    display: flex;
    gap: 10px;
}

.kanban-filters {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-group label {
    font-size: 14px;
    color: #666;
    white-space: nowrap;
}

.filter-group select {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    min-width: 120px;
}

.kanban-board-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.kanban-columns {
    display: flex;
    gap: 1px;
    background: #f0f0f0;
    min-height: 600px;
}

.kanban-column {
    flex: 1;
    background: white;
    display: flex;
    flex-direction: column;
    border-top: 4px solid #ddd;
    min-width: 280px;
}

.column-header {
    padding: 15px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.column-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.urgency-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.urgency-name {
    color: #333;
}

.demand-count {
    background: #e9ecef;
    color: #666;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.add-to-column {
    padding: 4px 8px;
    font-size: 12px;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.add-to-column:hover {
    opacity: 1;
}

.column-content {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* 需求卡片样式 */
.demand-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    cursor: pointer;
}

.demand-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.card-type {
    display: flex;
    align-items: center;
    gap: 6px;
}

.type-icon {
    font-size: 16px;
}

.type-name {
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

.card-actions {
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.demand-card:hover .card-actions {
    opacity: 1;
}

.btn-icon {
    background: none;
    border: none;
    padding: 4px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.3s ease;
}

.btn-icon:hover {
    background: #f8f9fa;
}

.card-content {
    margin-bottom: 12px;
}

.demand-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.demand-description {
    font-size: 14px;
    color: #666;
    line-height: 1.4;
    margin: 0 0 12px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.demand-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

.meta-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
}

.meta-label {
    color: #666;
    font-weight: 500;
}

.meta-value {
    color: #333;
    font-weight: 500;
}

.meta-value.status-pending {
    color: #ffc107;
}

.meta-value.status-in_progress {
    color: #007bff;
}

.meta-value.status-completed {
    color: #28a745;
}

.meta-value.status-cancelled {
    color: #dc3545;
}

.meta-value.overdue {
    color: #dc3545;
    font-weight: 600;
}

.progress-section {
    margin-bottom: 12px;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.progress-label {
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

.progress-text {
    font-size: 12px;
    color: #333;
    font-weight: 600;
}

.progress-bar {
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-tags {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.tag {
    background: #e9ecef;
    color: #666;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 500;
}

.card-priority {
    display: flex;
    align-items: center;
}

.priority-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e9ecef;
}

.modal-header h3 {
    margin: 0;
    color: #333;
    font-size: 18px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.modal-close:hover {
    background: #f8f9fa;
}

.modal-body {
    padding: 24px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-row {
    display: flex;
    gap: 15px;
}

.form-row .form-group {
    flex: 1;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

/* 用户管理样式 */
.user-management {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.user-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e9ecef;
    background: #f8f9fa;
}

.user-header h2 {
    margin: 0;
    color: #333;
}

.user-table {
    width: 100%;
    border-collapse: collapse;
}

.user-table th,
.user-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.user-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.user-table td {
    font-size: 14px;
    color: #666;
}

.user-status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.user-status.active {
    background: #d4edda;
    color: #155724;
}

.user-status.inactive {
    background: #f8d7da;
    color: #721c24;
}

.user-actions {
    display: flex;
    gap: 8px;
}

.user-actions .btn {
    padding: 4px 8px;
    font-size: 12px;
}

/* 流程配置样式 */
.workflow-config {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.workflow-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e9ecef;
    background: #f8f9fa;
}

.workflow-list {
    padding: 20px 24px;
}

.workflow-item {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 16px;
    overflow: hidden;
}

.workflow-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #f8f9fa;
    cursor: pointer;
}

.workflow-info h4 {
    margin: 0 0 4px 0;
    color: #333;
    font-size: 16px;
}

.workflow-info p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.workflow-actions {
    display: flex;
    gap: 8px;
}

.workflow-content {
    padding: 20px;
    border-top: 1px solid #e9ecef;
    display: none;
}

.workflow-content.expanded {
    display: block;
}

.workflow-nodes {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.workflow-node {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    background: #f8f9fa;
}

.node-order {
    width: 30px;
    height: 30px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    margin-right: 12px;
}

.node-info {
    flex: 1;
}

.node-info h5 {
    margin: 0 0 4px 0;
    color: #333;
    font-size: 14px;
}

.node-info p {
    margin: 0;
    color: #666;
    font-size: 12px;
}

.node-assignee {
    color: #666;
    font-size: 12px;
    font-style: italic;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .kanban-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }

    .kanban-stats {
        justify-content: space-around;
    }

    .kanban-filters {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }

    .filter-group {
        flex-direction: column;
        align-items: stretch;
        gap: 5px;
    }

    .kanban-columns {
        flex-direction: column;
        gap: 16px;
        padding: 16px;
        background: #f8f9fa;
    }

    .kanban-column {
        min-width: auto;
        border-radius: 8px;
        border-top: 4px solid #ddd;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .modal-content {
        margin: 10px;
        max-width: none;
    }

    .user-table {
        font-size: 12px;
    }

    .user-table th,
    .user-table td {
        padding: 8px 12px;
    }
}

@media (max-width: 480px) {
    .login-box {
        padding: 30px 20px;
    }

    .kanban-header {
        padding: 15px;
    }

    .kanban-filters {
        padding: 15px;
    }

    .column-content {
        padding: 12px;
    }

    .demand-card {
        padding: 12px;
    }

    .modal-body {
        padding: 20px;
    }
}